package com.cloud.basic.gateway;

import com.purgeteam.dynamic.config.starter.annotation.EnableDynamicConfigEvent;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;

/**
 * @Description:
 * @Auther: zhangxun
 * @Date: 2020/8/3 12:10
 */
// 参考文章：https://www.jianshu.com/p/208db28bb78c
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient//Nacos不需要这个注解也能开启服务注册与发现。
@EnableDynamicConfigEvent//开启配置变化监听功能
@RefreshScope
public class GatewayApplication {
    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }
}